#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
    int score = 0;;
    int max = 0;
    int min = 100;
    int sum = 0;
    int count = 0;
    while (scanf("%d", &score) != EOF)
    {
        count++;
        if (score > max)
            max = score;
        if (score < min)
            min = score;
        sum += score;
        if (count == 7)
        {
            printf("%.2f\n", (sum - max - min) / 5.0);
            max = 0;
            min = 100;
            sum = 0;
            count = 0;
        }
    }
    return 0;
}